import request from '@/router/axios';
import config from '@/config/website'
//产品信息
export const orderList = (current, size, equipment) => {
    return request({
        url: '/api/blade-sale/hg_sale/saleSmallOrder/page',
        method: 'get',
        params: {
            current,
            size,
            ...equipment
        }
    })
}
export const orderSave = (data) => {
    return request({
        url: '/api/blade-sale/hg_sale/saleSmallOrder/save',
        method: 'post',
        data
    })
}
export const orderUpdate = (data) => {
    return request({
        url: '/api/blade-sale/hg_sale/saleSmallOrder/update',
        method: 'post',
        data
    })
}
export const orderDel = (ids) => {
    return request({
        url: '/api/blade-sale/hg_sale/saleSmallOrder/remove',
        method: 'post',
        params: {
            ids
        }
    })
}
export const orderView = (id) => {
    return request({
        url: '/api/blade-sale/hg_sale/saleSmallOrder/detail',
        method: 'get',
        params: {
            id
        }
    })
}
//提交
export const orderSubmit = (id) => {
    return request({
        url: '/api/blade-sale/hg_sale/saleSmallOrder/start-process',
        method: 'post',
        params: {
            id,
        }
    })
}
//订单产品信息
export const orderProductList = (proNo) => {
    return request({
        url: '/api/hg-public/hg_project/prjCustPrdDemand/list',
        method: 'get',
        params: {
            proNo
        }
    })
}

//订单产品信息
export const orderProductListByCustomerId = (customerId,projectId) => {
  return request({
    url: '/api/hg-public/productdrawingchange/productByCustomerIdAndProjectId',
    method: 'get',
    params: {
      customerId,
      projectId
    }
  })
}

//获取产品要求列表
export const getProductRequiredList = (id) => {
    return request({
        url: '/api/blade-sale/hg_sale/saleSmallOrder/list',
        method: 'get',
        params: {
            id
        }
    })
}
//项目列表
export const getProjectList = () => {
    return request({
        url: '/api/blade-sale/hg_sale/saleSmallOrder/findAll',
        method: 'get',
    })
}
